package dry.example.controller;

import dry.example.service.NameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    NameService nameService;

    /**
     * http://127.0.0.1:10001/actuator/hystrix.stream
     */

    /**
     * http://127.0.0.1:10001
     */
    @RequestMapping(value = "/", method = RequestMethod.GET)
    public Object index() {
        return "index";
    }

    /**
     * http://127.0.0.1:10001/a
     */
    @RequestMapping(value = "/a", method = RequestMethod.GET)
    public Object a() {
        return nameService.a();
    }

}